package cn.edu.cdu.group4nb.service.impl;

import cn.edu.cdu.group4nb.mapper.EducationMapper;
import cn.edu.cdu.group4nb.mapper.MyInstitutionMapper;
import cn.edu.cdu.group4nb.po.Education;
import cn.edu.cdu.group4nb.po.EducationExample;
import cn.edu.cdu.group4nb.po.Institution;
import cn.edu.cdu.group4nb.service.EducationService;
import cn.edu.cdu.group4nb.service.InstitutionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class EducationServiceImpl implements EducationService {
    @Autowired
    private EducationMapper EducationMapper;


    @Override
    public List<Education> selectEducation() {
        EducationExample example=new EducationExample();
        return EducationMapper.selectByExample(example);
    }

    @Override
    public int insertEducation(Education education) {
        return EducationMapper.insert(education);
    }

    @Override
    public Boolean delEducation(int[] institution_id) {
        return EducationMapper.delEducation(institution_id);
    }

    @Override
    public int updEducation(Education education) {
        return EducationMapper.updateByPrimaryKey(education);
    }
}
